﻿<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link href="../../../../css/default.css" rel="stylesheet" />
</head>
<body>
    <table style="color:#000">
        <tr>
            <td style="color:#000">
                <div template="list_view" header="#search_box">
                    <div id="search_box">
                        <span class="font-size-20">
                            {{$$$res("Tìm")}}
                        </span>
                        <input type="text" class="k-textbox" ng-model="txtSearch.RoleName" />
                    </div>
                    <div ng-repeat="p in data|filter:txtSearch" ng-click="doEditRole(p);" style="border:solid 1px #dcdcdc;margin-bottom:8px">
                        <table>
                            <tr>
                                <td style="background-color:#ff0000">&nbsp;</td>
                                <td>
                                    <span>{{$$$res('Tên nhóm')}}</span>
                                </td>
                                <td>
                                    <span>{{p.RoleName}}</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>{{$$$res('Ngày tạo')}}</span>
                                </td>
                                <td>
                                    <span>{{p.CreatedOn|date:'dd-MM-yyyy hh:mm:ss'}}</span>
                                </td>
                            </tr>
                        </table>




                    </div>
                </div>
                <div template="tool_bar">
                    <input type="button" value="{{$$$res('Thêm')}}" class="k-button" />
                </div>
            </td>
        </tr>
    </table>
    <script>
        var scope = this;
        scope.$$$ready(function () {
            WS.$call("Roles/GetListOfRoles", undefined, function (res) {
                scope.data = res;
                scope.$apply();
            });
        })
        scope.doEditRole = function (item) {
            scope.$parent.currentRole = item;
            scope.$parent.$view.loadView("/views/ThietLapHeThong/PhanQuyen/NguoiDung.Role.html");

        };
    </script>

</body>
</html>